package com.tfswx.jcyw.ruleenginedesigner.service;

import com.tfswx.jcyw.ruleenginedesigner.dto.fs.FileDownloadInputDTO;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;

/**
 * @author Ricky
 * @date 2021/4/19
 */
public interface FsService {
    /**
     * 下载文件
     *
     * @param inputDto
     * @param response
     * @return byte[]
     * @throws IOException
     */
    byte[] download(FileDownloadInputDTO inputDto, HttpServletResponse response) throws IOException;

    byte[] download(File file, String fileName, HttpServletResponse response) throws IOException;

    byte[] download(byte[] bytes, String fileName, HttpServletResponse response) throws IOException;
}
